﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TankGameV1._0.Properties;

namespace TankGameV1._0
{
    class Born:GameObject
    {
        private Image[] images =
        {
            Resources.born1,
            Resources.born2,
            Resources.born3,
            Resources.born4
        };
        public Born(int x,int y) : base(x, y) { }
        public override void Draw(Graphics g)
        {
            for(int i = 0; i < images.Length; i++)
            {
                g.DrawImage(images[i], this.X, this.Y);
            }
            //休眠250毫秒后删除图片
            Thread.Sleep(150);            
            SingleObject.GetObject().RemoveObject(this);
        }
    }
}
